package com.softserveinc;

import android.app.Application;

import com.softserveinc.appwidget.MovieManagerWidgetMediator;
import com.softserveinc.data.MovieDataManager;
import com.softserveinc.settings.AppWidgetSettingManager;
import com.softserveinc.settings.HardwareManager;
import com.softserveinc.settings.SettingsManager;

public class MovieManagerApplication extends Application {

	private MovieDataManager dataManager;
	private HardwareManager hardwareManager;
	private SettingsManager settingsManager;
	private MovieManagerWidgetMediator mediator;
	private AppWidgetSettingManager widgetSettingManager;

	@Override
	public void onCreate() {
		super.onCreate();

		settingsManager = new SettingsManager(getApplicationContext());
		hardwareManager = new HardwareManager(getApplicationContext());
		dataManager = new MovieDataManager(getApplicationContext());
		widgetSettingManager = new AppWidgetSettingManager(
				getApplicationContext());
		mediator = new MovieManagerWidgetMediator(getApplicationContext());

		hardwareManager.registerReceivers();
	}

	public MovieDataManager getDataManager() {
		return dataManager;
	}

	public MovieManagerWidgetMediator getMediator() {
		return mediator;
	}

	public HardwareManager getHardwareManager() {
		return hardwareManager;
	}

	public SettingsManager getSettingsManager() {
		return settingsManager;
	}

	public AppWidgetSettingManager getWidgetSettingManager() {
		return widgetSettingManager;
	}
}
